#!/usr/bin/env python
# -*- coding:utf-8 -*-
# Author: G171117 JieJiSS

def trapezoid_area(upper_width, lower_width, height):
    r"""
    计算梯形面积
    """
    return (upper_width + lower_width) * height / 2

def f_in(prompt=""):
    r"""
    float(input(...))
    """
    return float(input(prompt))

print("梯形的面积为：", trapezoid_area( \
    f_in("请输入梯形上底："), \
    f_in("请输入梯形下底："), \
    f_in("请输入梯形的高：") \
), sep='')
